home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / rc-1.000 / rc-1 / rc-1.5-linux / CHANGES < prev    next >
Encoding:
Text File  |  1994-03-07  |  8.3 KB  |  264 lines

  1. Changes since 1.2: (Too many to count!)
  2.  
  3. A memory stomping bug was fixed (provoked by assigning a variable
  4. to its old value plus something else).
  5.  
  6. Better signal handling; a real signal handler which manages a queue
  7. of pending signals was added.
  8.  
  9. rc now ignores SIGQUIT and traps SIGINT even in non-interactive
  10. mode. Thus,
  11.  
  12.     rc ed.sh
  13.  
  14. will not do mysterious things if the shell script "ed.sh" calls a
  15. command like "ed" and then you hit ^C.
  16.  
  17. rc now opens 0, 1, 2 on /dev/null if they are inherited closed.
  18. rc -o prevents this.
  19.  
  20. A couple of stupid O(n^2) string appends were replaced with O(n)
  21. loops. This should make foo=`{cat /etc/termcap} bar=$^foo a little
  22. faster :-)
  23.  
  24. Returning a list of signals from a function is now legal, so "return
  25. $status" should always work.
  26.  
  27. The code has been revised, new printing routines have been added.
  28.  
  29. rc no longer uses redundant braces when exporting functions.
  30.  
  31. A first stab at a verification suite has been added (trip.rc).
  32. (someone, please help me make this comprehensive!)
  33.  
  34. rc -p now does not initialize functions from the environment. This
  35. should make it easier to write shell scripts that don't need to
  36. assume anything about the environment.
  37.  
  38. Inherited ignored signals are now ignored in the current shell and
  39. passed on ignored to the child processes. whatis -s also reflects
  40. this information.
  41.  
  42. A file descriptor leak in the /dev/fd implementation of >{} was
  43. fixed.
  44.  
  45. A variable set to '' was not imported from the environment; this
  46. has been fixed.
  47.  
  48. Changes since 1.3beta:
  49.  
  50. New Makefile/config.h setup.
  51.  
  52. builtin echo may now be conditionally included out, to use a Goldwynism.
  53.  
  54. builtin exit takes any legal exit status. If the status is not all zeros,
  55. rc exits with 1. (having "exit sigiot" produce a core dump would be going
  56. a little far, I think.)
  57.  
  58. limit does not append a unit after a zero limit; 0g was too confusing.
  59.  
  60. exec > /nonexistentfile does not cause rc to exit any more.
  61.  
  62. If a noninteractive rc is started with sigint ignored, rc does not install
  63. its own signal handler.
  64.  
  65. error messages produced by rc in a subshell were cleaned up. (rc erroneously
  66. reset the 'interactive' flag after a fork)
  67.  
  68. print.c was cleaned up a little; no functionality was changed, but should
  69. be more portable now.
  70.  
  71. a bug in rc-1.3beta (not previous versions) was fixed: setting the first
  72. element of $path to '' caused PATH to be exported as '':etc..
  73.  
  74. getopt's "illegal option" message was gratuitously changed to something
  75. less abrupt.
  76.  
  77. some dead code was removed from input.c
  78.  
  79. %term was changed to %token in parse.y; apparently newer yacc's don't grok
  80. %term any more.
  81.  
  82. a race condition in the signal handler was fixed.
  83.  
  84. the variable in for() was getting evaluated each time through the loop
  85. (e.g., for (`{echo i;date>[1=2]} in 1 2 3)echo $i would print the date
  86. three times). This was cleaned up.
  87.  
  88. a redundant fork() was removed from walk.c; this showed up when running
  89. a braced command with a redirection in the background. e.g., {a;b}>c&
  90.  
  91. man pages for history and rc were cleaned up by david (thanks).
  92.  
  93. rc set SIGQUIT and SIGTERM to SIG_DFL on background jobs---even when
  94. trying to do old-style backgrounding (i.e., don't use process groups,
  95. just ignore SIGINT & SIGQUIT & SIGTERM).
  96.  
  97. $0 is now changed to the name of the signal when entering a signal
  98. handler. Thus it's possible to write code like
  99.  
  100.     fn sigint sigterm sigquit {
  101.         switch ($0) {
  102.         case sigint
  103.             ...
  104.         case sigterm
  105.             ...
  106.  
  107. wait with no arguments now prints the pid of any and all children
  108. that died with a signal. e.g.,
  109.  
  110.     ; wait
  111.     25321: terminated
  112.     25325: terminated
  113.  
  114. as opposed to
  115.  
  116.     ; wait
  117.     terminated
  118.  
  119. An error saving/restoring state in the input stream code would
  120. cause rc to exit with the (erroneous) command:
  121.  
  122.     eval '|[a'
  123.  
  124. FIFO's were not removed in a backgrounded command, e.g.,
  125.  
  126.     cat <{echo hi}&
  127.  
  128. Changes since rc-1.4beta:
  129.  
  130. getopt was renamed to rc_getopt to avoid libc collisions.
  131.  
  132. $cdpath with a / in it caused a cd to sometimes have two //'s at the
  133. front of the path. This is reserved by POSIX, so I changed it to skip
  134. one of the /'s.
  135.  
  136. signal handling now emulates sh in the way I described in a previous
  137. message: the race condition present in older rc's whereby some SIGINTs
  138. got lost is now gone; any SIGINT received during a wait() is acted upon
  139. at the end of the wait(), unless of course SIGINT is being deliberately
  140. ignored.
  141.  
  142. getopt was renamed to avoid naming conflicts with libc. Also a sound
  143. move since rc_getopt is no longer quite libc-getopt compatible; I had
  144. to add in a mechanism for resetting getopt.
  145.  
  146. signal handler code in fn.c was cleaned up; there were several bugs
  147. in rc-1.4beta, notably the shell sometimes spawned background jobs
  148. with SIGTERM ignored. I took the opportunity to make things a little
  149. cleaner here.
  150.  
  151. a quasi-memory leak in the code for while() was fixed: a long-running
  152. while that had rc commands allocating memory in it could cause the
  153. shell to grow without bounds. I fixed this by placing the while loop
  154. (*and* test!) inside a new allocation arena each time through the loop.
  155.  
  156. A new configuration parameter, NOJOB, was added to allow you to force
  157. v7-style backgrounding (no setpgrp, ignore SIGINT and SIGTERM).
  158.  
  159. The FIFO code was reworked a little. It should be more robust now---
  160. FIFOs get removed at the end of the command of the argument list
  161. that they were on:
  162.  
  163.         fn foo {echo $*; cat $*}
  164.         foo<{echo hi}
  165.  
  166. now works as expected. Also FIFO names are pushed onto the exception
  167. stack so that their removal occurs in the face of exceptions and so
  168. on.
  169.  
  170. A memory leak in treefree() was plugged up --- the root node of a
  171. function was not getting freed.
  172.  
  173. Changes since rc-1.4:
  174.  
  175. General changes:
  176.  
  177.         Some small memory leaks/uninit references revealed by Purify.
  178.  
  179.         $bqstatus for querying the exit status of a backquote.
  180.  
  181.         Globbing through unreadable directories.
  182.  
  183.         More options to whatis.
  184.  
  185.         History append which always re-opens the file (avoids
  186.         inconsistencies over multiple NFS-mounted accesses to
  187.         $history).
  188.  
  189.         Support "rc -s".
  190.  
  191. ---------
  192.  
  193. Makefile:    Added comment referring to README for yacc/malloc problem.
  194.  
  195. uiltins.c:    Added more options to whatis, protected rlimit prototypes
  196.         with #ifndef SYSVR4, renamed SIGCHK to sigchk.
  197.  
  198. except.c:    Patched nl_on_intr printing to happen only in interactive
  199.         shells.
  200.  
  201. exec.c:        Added comment explaining nl_on_intr variable, renamed SIGCHK
  202.         to sigchk.
  203.  
  204. fn.c:        Replaced by-hand consing of exception stack etc. for signal
  205.         handler execution with call to funcall(). Replaced fun2str
  206.         call with call on print routines.
  207.  
  208. footobar.c:    Got rid of memory leak in get_name(), parenthesize count,
  209.         flat and var nodes for correctness in unparsing, removed
  210.         list2str, made get_name use nalloc space, merge in a
  211.         better parse_var from es.
  212.  
  213. glob.c:        Split out a test so that closedir is called correctly, renamed
  214.         SIGCHK to sigchk.
  215.  
  216. glom.c:        Added bqstatus, renamed SIGCHK to sigchk, removed spurious
  217.         setsigdefaults, patched uninit memory reference, rename
  218.         "clear" to "memzero", wait for bq subproc to finish on EINTR.
  219.  
  220. hash.c:        Added options to function/variable print code.
  221.  
  222. history/history.c: Added '@' to the list of chars which can precede an
  223.         ignored '-'.
  224.  
  225. input.c:    Got rid of tiny memory leak in closefds, got rid of uninit
  226.         memory reference in popinput, moved nul ignored check into
  227.         realgchar(), changed history append to always reopen the
  228.         history file, replaced SIGCHK with sigchk. Freed memory
  229.         returned by call to readline().
  230.  
  231. lex.c:        Corrected typo in comment, moved nul character ignore code
  232.         to input routines.
  233.  
  234. main.c:        Added -s flag.
  235.  
  236. nalloc.c:    Added convenience feature to erealloc. (Allow NULL parameter)
  237.  
  238. print.c:    Changed use of va_start so broken compilers can compile
  239.         print code.
  240.  
  241. proto.h:    Added fake memset.
  242.  
  243. rc.h:        Replaced clear() function prototype with a macro call on
  244.         memset(), removed SIGCHK, fixed prototypes.
  245.  
  246. signal.c:    Removed unconditional exit in catcher code, renamed SIGCHK
  247.         to sigchk.
  248.  
  249. status.c:    Rewrite sgetstatus breaking out strstatus so that bqstatus
  250.         can be set from glom routines.
  251.  
  252. utils.c:    Got rid of clear() (use memset from C library), rename SIGCHK
  253.         to sigchk.
  254.  
  255. var.c:         Got rid of memory leak in listassign(), converted list2str()
  256.         call to something using the print routines.
  257.  
  258. version.c:    New version string.
  259.  
  260. wait.c:        Got rid of memory leak in rc_fork, renamed SIGCHK to sigchk.
  261.  
  262. walk.c:        Fixed pre-redirection bug, removed spurious setsigdefaults(),
  263.         renamed SIGCHK to sigchk.
  264.